package com.evildog.workspace.file.upload.properties;

import lombok.Data;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.annotation.Order;

@Configuration
@ConditionalOnProperty(prefix = "workspace.file.nginx", value = "enable")
@ConfigurationProperties(prefix = "workspace.file.nginx")
@Order(-1)
@Data
public class FileNginxProperties {

    /**
     * 上传后nginx访问文件的前缀
     *
     * e.g. 127.0.0.1:8080/
     */
    private String prefix;

    /**
     * 上传的文件放置的位置
     *
     * e.g. /opt/app/file/
     */
    private String serverPath;
}
